﻿using System;

namespace Budget.Core.Extensions
{
    public static class ExceptionExtensions
    {
         public static string Details(this Exception ex)
         {
             return string.Format(@"Message: [{0}]{1}", ex.Message,
                                  ex.InnerException != null
                                      ? string.Format("{0} Inner message: [{1}]", Environment.NewLine, ex.InnerException.Message)
                                      : string.Empty);
         }
    }
}